package cn.edu.scau.cmi.yangjiamin.simplefactory;

public class PolicyProducer {
	public static AutoInsurance getPolicyObj(String option) {
		AutoInsurance policy = null;
		if(option.compareTo("bodyInjure") == 0) {policy = new BodyInjure();}
		else if(option.compareTo("carDamaged") == 0) {policy = new CarDamaged();}
		else if(option.compareTo("casualties") == 0) {policy = new Casualties();}
		else if(option.compareTo("manyAccident") == 0) {policy = new ManyAccident();}
		return policy;
	}

}
